import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../layout'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children:[
      //首页
      {
        path: 'dashboard',
        component: () => import('@/layout/components/views/dashboard/index.vue')
      },
      //地产经纪
      {
        path: 'realEstateAgent',
        component: () => import('@/layout/components/views/realEstateAgent/index.vue')
      },
      //地产分类
      {
        path: 'classify',
        component: () => import('@/layout/components/views/classify/index.vue')

      },
      //关于我们
      {
        path: 'aboutUs',
        component: () => import('@/layout/components/views/aboutUs/index.vue')
      },
    ]
  },
  {
    path: '/404',
    component: () => import('@/layout/components/404.vue'),
    // hidden: true
  },
  
]

const router = new VueRouter({
  routes
})

export default router
